package com.llc.gulimall.product.feign;

import com.llc.common.to.SkuHasStockVo;
import com.llc.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author llc
 * @Description
 * @Version
 * @date 2022/2/6 13:43
 */
@FeignClient("gulimall-ware")
public interface WareFeignService {
    @PostMapping(value = "/ware/waresku/hasStock")
     R getSkuHasStock(@RequestBody List<Long> skuIds);

    @RequestMapping("/ware/waresku/stock/batch")
    R getSkuStockBatch(@RequestBody List<Long> skuIds);

    @RequestMapping("/ware/waresku/stock/{skuId}")
    R getSkuStock(@PathVariable("skuId") Long skuId);
}
